window.onload=function(){
				var index =0;
				var body=document.body;
				var bodyW=body.clientWidth;
	  			var imgList=document.getElementById("imgList");
				var allA=document.getElementsByClassName("a");
	     		allA[index].style.backgroundColor="black";
	     		imgList.style.transition="linear 3s";
	     		var icon=document.getElementsByClassName("icon")[0];
	     		var permes=document.getElementsByClassName("perMes")[0];
				
				//设置个人信息隐藏和显示
				icon.onmousemove=function  () {
							permes.style.display="block";
				}
				icon.onmouseout=function  () {
							permes.style.display="";
				}
     
     
     
     //设置点击切换功能
     for (var i=0;i<allA.length;i++) {
		     	allA[i].num=i;
		     	allA[i].onclick=function(){
		     	clearInterval(t);
		     	index=this.num
		        imgList.style.left=-0.8*bodyW*index+"px";
		        setA();
     };
  
     
 
     	
     };
    //遍历所有按钮为红
     function setA(){     			
				for (var i=0;i<allA.length;i++) {
							allA[i].style.backgroundColor="";
     			};
		     	 //设置选中的按钮为黑
		     	 allA[index].style.backgroundColor="black";
		     	
    };



	
				var t=setInterval(function(){
							imgList.style.transition="linear 3s";
							var oldValue=imgList.offsetLeft;
							var newValue=oldValue-1215;
							imgList.style.left=newValue+"px";
							if (newValue==-6075) {
										imgList.style.transition="0s"
										imgList.style.left="";			
							}
							

		     
		    	},4000);
				
				var nav=document.getElementsByClassName("nav1");
				var allM=document.getElementsByClassName("m");
				
//				alert(allM[2].style.display);
				
				function disp(a,b){
							a.onmousemove=function(){
										allM[0].style.display="";
                                    	allM[1].style.display="";
                                    	allM[2].style.display="";
										b.style.zIndex="11";
										b.style.display="block";								
							};
							b.onmousemove=function(){
										b.style.display="block";								
							};
							b.onmouseout=function(){
										b.style.display="";	
										b.style.zIndex="";
							};

                }
				disp(nav[0],allM[0]);
				disp(nav[1],allM[1]);
				disp(nav[2],allM[2]);
				//设置artouter淡入淡出效果
				var midli=document.getElementsByClassName("midli");
				var ao=document.getElementsByClassName("articleOuter");
				midli[0].onmousemove=function(){
						ao[0].style.opacity="1";
						ao[1].style.opacity="0";
						ao[2].style.opacity="0";
				}

				midli[1].onmousemove=function(){
						ao[0].style.opacity="0";
						ao[1].style.opacity="1";
						ao[2].style.opacity="0";
				}
				midli[2].onmousemove=function(){
						ao[0].style.opacity="0";
						ao[1].style.opacity="0";
						ao[2].style.opacity="1";
				}


				
 };